<template>
  <div>
      <div id="user-box">
<el-descriptions class="margin-top" title="用户信息列表" :column="3" :size="size" border>
    <template slot="extra">
    </template>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-user"></i>
        用户名
      </template>
      {{user.name}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-mobile-phone"></i>
        手机号
      </template>
     {{user.phone}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-location-outline"></i>
        邮箱
      </template>
      {{user.mail}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-tickets"></i>
        备注
      </template>
      <el-tag size="small">学校</el-tag>
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-office-building"></i>
        权限
      </template>
      {{user.authority}}
    </el-descriptions-item>
  </el-descriptions>
</div>
     <!-- <p>{{user.phone}}</p>  -->
  </div>
</template>

<script>
export default {
data(){
    return {
        user:"",
        size:""
    }
},
  created() {
    this.axios
      .get(this.$route.fullPath,{
            headers:{
              "token":sessionStorage.getItem('token')
            }
          })
      .then(response => {
        this.user = response.data;
      })
      .catch(error => alert(error));
  },
}
</script>

<style>
#user{
    width: 800px;
}
#user-box{
  padding-left: 50px;
  padding-right: 50px;
  background-color: #fafafa;
  padding-top: 50px;
  padding-bottom: 20px;
  height: 600px;
  margin: 40px 40px 40px 40px;
  /* box-shadow:0px 0px 10px 5px #aaa; */
}
</style>